#include<stdio.h>
int main()
{
int shouru=0,jin=0;
int income=0;
double shui=0;
scanf("%d %d",&shouru,&jin);
income=shouru-jin;

if(income>5000)
	{
	if(income-5000<=3000)
			{
			shui=(income-5000)*0.03;
			}
	if(income-5000>3000&&income-5000<=12000)
			{
			shui=(income-5000)*0.10-210;
			
			}
	if(income-5000>12000&&income-5000<=25000)
			{
			shui=(income-5000)*0.20-1410;
			
			}
	if(income-5000>25000&&income-5000<=35000)
			{
			shui=(income-5000)*0.25-2660;
			
			}
	if(income-5000>35000&&income-5000<=55000)
			{
			shui=(income-5000)*0.30-4410;
			
			}
	if(income-5000>55000&&income-5000<=80000)
			{
			shui=(income-5000)*0.35-7160;
			
			}
	if(income-5000>80000)
			{
			shui=(income-5000)*0.45-15160;
		
			
			}
	printf("%.2lf",shui);

		}


return 0;
}